using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class CategoryTypesBLL
	{
		private CategoryTypesDAO _CategoryTypesDAO;

		public CategoryTypesDAO CategoryTypesDAO
		{
			get { return _CategoryTypesDAO; }
			set { _CategoryTypesDAO = value; }
		}

		public CategoryTypesBLL()
		{
			CategoryTypesDAO = new CategoryTypesDAO();
		}
		public List<CategoryTypes> GetCategoryTypess()
		{
			try
			{
				return CategoryTypesDAO.GetCategoryTypess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public CategoryTypes GetCategoryTypes(int Id)
		{
			try
			{
				return CategoryTypesDAO.GetCategoryTypes(Id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddCategoryTypes(CategoryTypes oCategoryTypes)
		{
			try
			{
				return CategoryTypesDAO.AddCategoryTypes(oCategoryTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateCategoryTypes(CategoryTypes oCategoryTypes)
		{
			try
			{
				return CategoryTypesDAO.UpdateCategoryTypes(oCategoryTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCategoryTypes(CategoryTypes oCategoryTypes)
		{
			try
			{
				return CategoryTypesDAO.RemoveCategoryTypes(oCategoryTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveCategoryTypes(int Id)
		{
			try
			{
				return CategoryTypesDAO.RemoveCategoryTypes(Id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<CategoryTypes> DeserializeCategoryTypess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<CategoryTypes>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeCategoryTypess(string Path, List<CategoryTypes> CategoryTypess)
		{
			try
			{
				GenericXmlSerializer<List<CategoryTypes>>.Serialize(CategoryTypess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
